extends "../beierfasite-1/beierfasite-1.gd"


func _extInit():
	._extInit()
	lv = 2             #等级的设置
	addSkill("每{cd}秒向最靠前的2名友军位置投掷烟雾弹，使其机动提升75点，持续4秒", "烟雾弹", "ywd", 6)

func _castCdSkill(id):
	._castCdSkill(id)
	if id=="ywd":
		ywd()
func ywd():
	var chas = getAllChas(2)
	chas.sort_custom(self, "sortByFront")
	for i in range(2):
		if i >= chas.size():break
		var c = chas[i]
		createFlyEff(sprcPos, c, "sk_4_1_2")
		if c.hasBuff("b_bf_ywd") == null:
			castBuff(c, b_bf_ywd.new(4))

class b_bf_ywd:
	extends "../../../azurlane_ctrl/AzurBuff.gd"
	func _init(lv = 1):
		attInit()
		id = "b_bf_ywd"
		life = lv
		att.dod = 100
		buffName = "烟雾弹"
	func _upS():	
		if casCha.lv < 3:return
		var p3 = 2
		if casCha.upgraded == 1:
			p3 = 3
		for i in masCha.getNearChas(masCha.cell, false):
			masCha.castBuff(i, buff.b_shaoShi.new(p3))
			masCha.castBuff(i, buff.b_zhuoShao.new(p3))